package com.dingwen.treasure.kettle.init;

import com.dingwen.treasure.kettle.task.manager.TaskManager;
import org.springframework.boot.CommandLineRunner;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 * quartz 定时任务初始化
 *
 * @author dingwen
 * @date 2022/03/13
 */
@Configuration
public class TaskInit implements CommandLineRunner {

    /**
        任务管理组件
     */
    @Resource
    private TaskManager taskManager;

    @Override
    public void run(String... args) {
        taskManager.init();
    }
}
